home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (October 1991)
/
HamCall (Whitehall Publishing)(1991).bin
/
bcast
/
fccrf
/
ampattrn.asc
< prev
next >
Wrap
Text File
|
1990-10-14
|
10KB
|
235 lines
10 CLS
20 DIM AR(3,720),F(25),SI(25),OF(25),S(25),EH(25)
30 RD=3.14159/180
40 PRINT"So...you want me to calculate the Theoritical and"
45 PRINT"Standard patterns for and array. There are a couple"
50 PRINT"of things we should get straight from the outset:"
60 PRINT"I think in RADIANS so to convert your DEGREES to my"
70 PRINT"RAIANS I use an approximation of PI=3.14159. Also,"
80 PRINT"I need a common reference point. This means all "
85 PRINT"spacings and orientations must be refered to the same"
90 PRINT"tower. I won't know what to do if you tell me tower 3"
95 PRINT"is N 100 E of tower 2 and towe 2 is N 50 E of tower 1."
100 PRINT"Please I'm just a helpless machine!"
110 PRINT"So then....":PRINT
120 INPUT"How many towerws are we talking about? ";TR
130 IF (TR >1) AND (TR < 13) AND (TR=INT(TR)) THEN 150
135 PRINT
140 PRINT"Yea...Right...";TR;" towers...come on!!!":PRINT:GOTO 120
150 PRINT:PRINT TR;" tower eh? ";
160 IF TR < 4 THEN PRINT"That won't be too hard.":GOTO 190
170 IF TR > 8 THEN PRINT"This is a joke, right":GOTO 190
180 PRINT"I guess I'll have to work for my kilowatts today!"
190 PRINT:PRINT"Now you'll have to decide if you want to give me the"
195 PRINT"Field Radios of the towers or you have to give me the "
200 PRINT"Current and Base Impedance for each tower."
210 PRINT:PRINT" 1 FIELD RATIOS"
220 PRINT" 2 CURRENT & IMPEDANCE"
230 PRINT:INPUT"It's your recision --> ";C1
240 IF (C1=1) OR (C1=2) THEN 260
245 PRINT:PRINT
250 PRINT"NO..NO..NO you have to make a VALID choice!!!":PRINT:GOTO 210
260 ON C1 GOTO 280,330
270 PRINT "Internal program eror line 250":END
280 PRINT
290 FOR X=1 TO TR
300 PRINT"What is the FIELD RATIO for tower #";X;:INPUT " ";F(X)
310 NEXT X
320 GOTO 440
330 PRINT
340 FOR X=1 TO 2
350 FOR Y=1 TO TR
360 IF (X=1)THEN PRINT"Give Base Impedance of TOWER #";Y;:INPUT" ";I(Y)
370 IF (X=2)THEN PRINT"Give Base Current of TOWER #";Y;:INPUT" ";C(Y)
380 NEXT Y:PRINT:NEXT X
390 FOR Y=1 TO TR:F(Y)=C(Y)^2*I(Y):NEXT Y
400 RF=F(1)
410 FOR Y=1 TO TR:F(Y)=F(Y)/RF:NEXT Y
420 PRINT
430 FOR Y=1 TO TR
435 PRINT"The FIELD RATIO of Tower #";Y;" is ";F(Y): NEXT Y
440 PRINT
445 PRINT"OK, now give me the eletrical PHASE (current) in each tower."
450 PRINT"Remember these are not the same as the phase indications";
455 PRINT" on your antenna monitor (unless your're really LUCKY)!!!"
460 PRINT
470 FOR X=1 TO TR
480 PRINT"What is the Phase Angle of Tower #";X;:INPUT" ";SI(X)
490 NEXT X
500 PRINT
505 PRINT"Now give me the physical characteristics of the array."
510 PRINT"Let's start with the physical height expressed in electrical"
520 PRINT"degrees. At this point in time I am NOT capable of doing any"
530 PRINT"kind of sectionalized tower...."
535 PRINT"Nightly I pray to Programmer to allow me this feature."
540 FOR X=1 TO TR
550 PRINT"What is the height of Tower #";X;:INPUT" ";EH(X)
560 NEXT X
570 PRINT
580 FOR X= 1 TO TR
590 PRINT"What is the relative spacing between REFERENCE and Tower #";X
595 INPUT" ";S(X)
600 NEXT X
610 PRINT:PRINT"And finally, ":PRINT
620 FOR X= 1 TO TR
630 PRINT"What is the orientation (degrees from TRUE North)of Tower #";X
635 INPUT" ";OF(X)
640 NEXT X
650 PRINT:PRINT"Just a couple more itmes and we'll be ready to start"
655 PRINT
660 PRINT"To generate the theoritical pattern I will need a Pattern"
665 PRINT"Multiplier (mV/m). To convert the Theoritical to the "
670 PRINT"Standard pattern I will need a 'Q' factor. To make things"
680 PRINT"easier for me I will allow you to chose any Pattern multiplier"
690 PRINT" and 'Q' factor you desire."
700 INPUT"What is the value of the Pattern Multiplier ";K
710 INPUT"What is the value of the 'Q' factor ";Q
720 CLS
730 PRINT"OK, now that I know what your array looks like, I need"
740 PRINT"to know what information you want from me.":PRINT
750 PRINT"I calculate the pattern for every 0.5 degree of azimuth, 0-359.5"
760 PRINT"degrees. You may specify the starting and ending azimuth."
765 PRINT
770 INPUT"Start calculating at what Azimuth (0=True North) ";AS
780 INPUT"Stop calculating at what Azimuth (not over 359.5) ";AE:PRINT
790 PRINT"I will calculate the patterns from ";AS;" to ";AE;" degrees."
800 PRINT"Please note that the RMS value will be only"
805 PRINT"for the span you indicated."
810 PRINT:PRINT"Now give me the elevation angle (0=horizon) you wish."
820 PRINT"I can calculate for any specified elevation"
825 PRINT"from 0 to 90 degrees"
830 PRINT:INPUT"What elevation angle do you desire ";EA:PRINT
840 PRINT"At this time I am not capable of accepting your"
845 PRINT"augmentation data. The necessary code can be found at the"
850 PRINT"end of my program if you desire to activate it."
860 PRINT"There is dummy data just before the augmentation routine"
865 PRINT"as a sample. You may wish to perform surgery on my code."
870 PRINT
880 PRINT"Finally, you can specify the interval from your start azimuth"
890 PRINT"that printed data is required. Thus you can have a print out"
900 PRINT"of every .5 degrees, 5 degrees or every 10 degrees etc."
910 PRINT"Just be sure your interval is a multiple of .5 degree.":PRINT
920 INPUT"What interval do you desire for output ";IV
925 REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
930 REM calculate vertical plane radiation characteristics
940 PRINT "THEORITICAL AND STANDARD PATTERN CALCULATIONS"
950 PRINT "FOR AN ARRAY OF ";TR;" TOWERS GIVEN THE FOLLOWING"
960 PRINT "ARRAY PARAMETERS"
970 PRINT
980 PRINT " FIELD","PHASE","RELATIVE","ORIENTATION","ELECTRICAL"
990 PRINT " RATIO","ANGLE","SPACING"," ","HEIGHT"
1000 FOR X=1 TO TR
1010 PRINT "TOWE #";X;" "F(X),SI(X),S(X),OF(X),EH(X)
1020 NEXT X
1030 FOR X=1 TO TR
1040 FI(X)=(COS(RD*EH(X)*SIN(RD*EA))-COS(EH(X)*RD))/((1-COS(EH(X)*RD))*COS(RD*EA))
1050 NEXT X
1060 PRINT
1070 PRINT "AND GIVEN AN ELEVATION ANGLE OF ";EA;" DEGREES,"
1080 PRINT
1090 PRINT "THE VERTICAL RADIATION CHARACTERISTIC OF EACH TOWER IS:"
1100 FOR X=1 TO TR
1110 PRINT " TOWER #";X;": ";FI(X)
1120 NEXT X
1130 CS=COS(EA*RD)
1135 PRINT
1140 PRINT "THE VALUE FOR THE COS(ELEVATION ANGEL) USED THE FIELD"
1150 PRINT "EQUATION IS CONSTATNT AT ALL AZIMUTHS FOR A GIVEN ELEVATION"
1160 PRINT "FOR AN ELEVATION ANGLE OF ";EA;" DEGREES THE COSINE IS ";CS
1165 PRINT
1170 PRINT "ASSUMING A PATTER MULTIPLIER OF ";K;" mV/m AND A Q OF ";Q
1180 PRINT
1190 PRINT "AZIMUTH THEORITICAL STANDARD"
1200 FOR AZ = AS TO AE STEP .5
1210 IF AZ/IV <> INT(AZ/IV) THEN 1230
1220 PRINT AZ,
1230 FOR X=1 TO TR
1240 T1=OF(X) - AZ
1250 T1=COS(T1*RD)
1260 T1=T1*CS
1270 T1=T1*S(X)
1280 FA(X)=T1+SI(X)
1290 RF(X)=F(X)*FI(X)
1300 X(X)=RF(X)*SIN(RD*FA(X)):Y(X)=RF(X)*COS(RD*FA(X))
1310 NEXT X
1320 X1=0:Y1=0
1330 FOR X=1 TO TR
1340 X1=X1+X(X):Y1=Y1+Y(X)
1350 NEXT X
1360 M=SQR(X1^2+Y1^2)
1370 TP=K*M:SP=SQR((K*M)^2+Q^2)
1380 N7=N7+1:AR(0,N7)=AZ*10:AR(1,N7)=TP:AR(C,N7)=SP:AR(3,N7)=SP
1390 IF AZ/IV <> INT(AZ/IV) THEN 1410
1400 PRINT TP,SP
1410 NM=NM+1:AB=AB+TP^2:BA=BA+SP^2
1420 NEXT AZ
1430 PRINT "RMS THEORITICAL = ";SQR(AB/NM)
1440 PRINT "RMS STANDARD = ";SQR(BA/NM)
1450 NM=0:AB=0:BA=0
1460 PRINT:PRINT
1465 REM ```````````````````````````````````````````````````````
1470 REM AUGMENTATION...AUGMENTATION
1480 REM CALCULATE END POINT OF SPAN...CA IS CENTRAL SPAN
1485 REM SP IS SPAN OF AUGMENT..MV IS MV/AT CENTRAL AZIMUTH
1490 CA= 2!:SP= 12!:MV= 70!:GOSUB 1690
1500 CA=61!:SP= 14!:MV=155!:GOSUB 1690
1510 CA=77!:SP= 17!:MV= 62!:GOSUB 1690
1520 CA=85.5:SP= 17!:MV= 60!:GOSUB 1690
1530 CA=100 :SP= 29!:MV= 69!:GOSUB 1690
1540 CA=115 :SP= 20!:MV= 80!:GOSUB 1690
1550 CA=125 :SP= 20!:MV= 70!:GOSUB 1690
1560 CA=135.5:SP=15!:MV= 60!:GOSUB 1690
1570 CA=195 :SP= 30!:MV=400!:GOSUB 1690
1580 CA=210 :SP= 26!:MV=325!:GOSUB 1690
1590 CA=223 :SP= 25!:MV=195!:GOSUB 1690
1600 CA=235.5:SP=19!:MV=148.5:GOSUB 1690
1610 CA=245 :SP= 19!:MV=170!:GOSUB 1690
1620 CA=255 :SP= 20!:MV=240!:GOSUB 1690
1630 CA=279 :SP= 48!:MV=370!:GOSUB 1690
1640 CA=310 :SP= 52!:MV=250!:GOSUB 1690
1650 CA=346 :SP= 19!:MV= 71!:GOSUB 1690
1660 CA=355.5:SP=13!:MV= 61.4:GOSUB 1690
1670 GOSUB 1970
1680 GOTO 1900
1690 HS=SP/2
1700 SS=CA-HS
1710 ES=CA+HS
1715 PRINT
1720 PRINT"AUGMENTATION OF THE ";CA;" AZIMUTH (DEGREES TRUE)"
1730 PRINT"OVER A SPAN OF ";SP;"DEGREES FOR AN FIELD OF ";MV;"mV/M"
1740 PRINT
1750 A=MV^2-AR(3,(CA*2)+1)^2
1760 FOR X=SS TO ES STEP .5
1770 IF X < 0 THEN Y=X+360:GOTO 1800
1780 IF X >= 360 THEN Y=X-360:GOTO 1800
1790 Y=X
1800 TB=(Y*2)+1
1810 D=ABS(CA-X)
1820 T1=COS((180*(D/SP))*RD)
1830 NF=SQR(AR(3,TB)^2+(A*T1^2))
1840 AR(3,TB)=NF
1850 GOTO 1870
1860 PRINT AR(O,TB)/10,AR(1,TB),AR(2,TB),AR(3,TB)
1870 NEXT X
1880 RETURN
1890 PRINT "AZIMUTH THEORITICAL STANDARD AUGMENTED"
1900 FOR X=1 TO 720
1910 IF (AR(0,X)/10)/10 <> INT(AR(0,X)/10)/10 THEN 1930
1920 PRINT AR(0,X)/10,AR(1,X),AR(2,X),AR(3,X)
1930 MS=MS+AR(4,X)^2
1940 NEXT X
1950 PRINT "RMS AUGMENTED = ";SQR(MS/720)
1960 END
1970 PRINT CHR$(4);"OPEN WOHO.DAY.PTTRN"
1980 PRINT CHR$(4);"WRITE WOHO.DAY.PTTRN"
1990 FOR X=1 TO 720
2000 PRINT AR(1,X):PRINT AR(3,X)
2010 NEXT X
2020 PRINT CHR$(R);"CLOSE"
2030 RETURN
3000 REM BY PETER WALKOWIAK
3010 REM WWWM/WOHO
3020 REM P.O. BOX 167581
3030 REM TOLEDO, OH. 43616
3040 REM 419/255-1470